﻿using SqlSugar;

namespace Api.Shared.Model.Chengya
{
    public class WorkOrderFeedback
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        [SugarColumn(IsNullable = true)]
        public string WorkOderId { get; set; } = string.Empty;

        [SugarColumn(IsNullable = true)]
        public string WorkOderId2 { get; set; } = string.Empty;

        [SugarColumn(IsNullable = true)]
        public int MachineStauts { get; set; }

        [SugarColumn(IsNullable = true)]
        public DateTime Time { get; set; } = DateTime.Now;

        [SugarColumn(IsNullable = true)]
        public string StautsStr
        {
            get
            {

                return MachineStauts switch
                {
                    1 => "正在加工",
                    2 => "正在上料",
                    3 => "正在下料",
                    4 => "正在等待",
                    0 => "空闲",
                    _ => "初始化中"
                };
            }
        }


        [SugarColumn(IsNullable = true)]
        public string? Comment1 { get; set; } = string.Empty;

        [SugarColumn(IsNullable = true)]
        public string? Comment2 { get; set; } = string.Empty;

        [SugarColumn(IsNullable = true)]
        public string? Comment3 { get; set; } = string.Empty;

        [SugarColumn(IsNullable = true)]
        public string? Comment4 { get; set; } = string.Empty;

        [SugarColumn(IsNullable = true)]
        public string? Comment5 { get; set; } = string.Empty;
        [SugarColumn(IsNullable = true)]
        public string? Comment6 { get; set; } = string.Empty;
    }
}
